/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.own.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 种植户信息Entity
 * @author F
 * @version 2019-09-27
 */
@Table(name="own_medicine_grower_information", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一ID", isPK=true),
		@Column(name="own_medicine_plant_information_id", attrName="ownMedicinePlantInformationId", label="种植信息ID", isQuery=false),
		@Column(name="batch_id", attrName="batchId", label="种植批次号"),
		@Column(name="principal_name", attrName="principalName", label="种植户户主姓名", queryType=QueryType.LIKE),
		@Column(name="principal_id", attrName="principalId", label="种植户户主身份证"),
		@Column(name="phone", attrName="phone", label="联系电话"),
		@Column(name="is_poor", attrName="isPoor", label="是否为贫困户"),
		@Column(name="bm_batch_code", attrName="bmBatchCode", label="种植批次码"),
		@Column(name="create_company", attrName="createCompany", label="所属企业标识", isUpdate=false, isQuery=false),
		@Column(name ="uuid", attrName ="uuid",label = "操作标识符"),
		@Column(name="txid", attrName ="txid",label = "返回的txid"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class OwnMedicineGrowerInformation extends DataEntity<OwnMedicineGrowerInformation> {
	
	private static final long serialVersionUID = 1L;
	private String ownMedicinePlantInformationId;		// 种植信息ID
	private String batchId;		// 种植批次号
	private String principalName;		// 种植户户主姓名
	private String principalId;		// 种植户户主身份证
	private String phone;		// 联系电话
	private Integer isPoor;		// 是否为贫困户
	private String bmBatchCode;		// 种植批次码
	private String createCompany;		// 所属企业标识
	private String uuid; 	//索引本次操作的上下文标识
	private String txid;

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getTxid() {
		return txid;
	}

	public void setTxid(String txid) {
		this.txid = txid;
	}

	public OwnMedicineGrowerInformation() {
		this(null);
	}

	public OwnMedicineGrowerInformation(String id){
		super(id);
	}
	
	@Length(min=0, max=64, message="种植信息ID长度不能超过 64 个字符")
	public String getOwnMedicinePlantInformationId() {
		return ownMedicinePlantInformationId;
	}

	public void setOwnMedicinePlantInformationId(String ownMedicinePlantInformationId) {
		this.ownMedicinePlantInformationId = ownMedicinePlantInformationId;
	}
	
	@NotBlank(message="种植批次号不能为空")
	@Length(min=0, max=25, message="种植批次号长度不能超过 25 个字符")
	public String getBatchId() {
		return batchId;
	}

	public void setBatchId(String batchId) {
		this.batchId = batchId;
	}

	@NotBlank(message="种植户户主姓名不能为空")
	@Length(min=0, max=50, message="种植户户主姓名长度不能超过 50 个字符")
	public String getPrincipalName() {
		return principalName;
	}

	public void setPrincipalName(String principalName) {
		this.principalName = principalName;
	}

	@NotBlank(message="种植户户主身份证不能为空")
	@Length(min=0, max=18, message="种植户户主身份证长度不能超过 18 个字符")
	public String getPrincipalId() {
		return principalId;
	}

	public void setPrincipalId(String principalId) {
		this.principalId = principalId;
	}

	@NotBlank(message="联系电话不能为空")
	@Length(min=0, max=11, message="联系电话长度不能超过 11 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@NotNull(message="是否为贫困户不能为空")
	public Integer getIsPoor() {
		return isPoor;
	}

	public void setIsPoor(Integer isPoor) {
		this.isPoor = isPoor;
	}

	@NotBlank(message="种植批次码不能为空")
	@Length(min=0, max=50, message="种植批次码长度不能超过 50 个字符")
	public String getBmBatchCode() {
		return bmBatchCode;
	}

	public void setBmBatchCode(String bmBatchCode) {
		this.bmBatchCode = bmBatchCode;
	}
	
	@Length(min=0, max=64, message="所属企业标识长度不能超过 64 个字符")
	public String getCreateCompany() {
		return createCompany;
	}

	public void setCreateCompany(String createCompany) {
		this.createCompany = createCompany;
	}
	
}